package com.example.admin.controller;

import com.example.common.service.ExpressService;
import com.example.common.vo.ExpressListVO;
import com.example.common.vo.ResultDataVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/express")
@Api(tags = "快递")
public class ExpressController {

    @Autowired
    private ExpressService expressService;

    @ApiOperation("获取快递列表")
    @GetMapping("/getList")
    public ResultDataVO<List<ExpressListVO>> getList() {
        return ResultDataVO.success(expressService.getList());
    }
}
